//路由 vue-router 的入口文件
import VueRouter from 'vue-router'

import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import newslist from './components/news/newslist.vue'
import newsinfo from './components/news/newsinfo.vue'
import photoslist from './components/photos/photoslist.vue'
import photoinfo from './components/photos/photoinfo.vue'

const router = new VueRouter({
    routes: [
        { path: "/", redirect: "/home" },
        { path: "/home", component: HomeContainer },
        { path: "/member", component: MemberContainer },
        { path: "/shopcar", component: ShopcarContainer },
        { path: "/search", component: SearchContainer },
        { path: "/home/newslist", component: newslist },
        { path: '/home/newsinfo/:id', component: newsinfo },
        { path: "/home/photoslist", component: photoslist },
        { path: "/home/photoinfo/:id", component: photoinfo }
    ],
    linkActiveClass: "mui-active"
})

export default router